<?php

/**
 * 协商退出
 *
 * Created by PhpStorm.
 * User: evan
 * Date: 2016/12/25
 * Time: 下午5:53
 */
class Consult extends MY_Api_Controller
{
    public function apply()
    {
        $ds_id       = (int)$this->input->get_post('ds_id');
        $anchor_uid  = (int)$this->input->get_post('anchor_uid');
        $auction_uid = (int)$this->input->get_post('auction_uid');
        //$status      = (int)$this->input->get_post('status');


        $this->load->service('direct_seeding/service_direct_seeding_consult');
        $data = $this->service_direct_seeding_consult->apply($ds_id, $anchor_uid, $auction_uid);


        $this->json_output($data['data'], $data['status']);
    }
    
    
    /**
     * 申请协商直播时间
     *
     * @return array
     */
    public function apply_livetime()
    {
    	$ds_id      = (int)$this->input->get_post('ds_id');
    	$uid        = $this->uid;
    	$start_time = $this->input->get_post('start_time');
    
    
    	$this->load->service('direct_seeding/service_direct_seeding_consult');
    	$data = $this->service_direct_seeding_consult->apply_livetime($ds_id, $uid, $start_time);
    
    
    	$this->json_output($data['data'], $data['status']);
    }
    
    
    /**
     * 确认直播时间
     *
     * @return array
     */
    public function confirm_livetime()
    {
    	$ds_id      = (int)$this->input->get_post('ds_id');
    	$uid        = $this->uid;
    	$start_time = $this->input->get_post('start_time');
    
    
    	$this->load->service('direct_seeding/service_direct_seeding_consult');
    	$data = $this->service_direct_seeding_consult->confirm_livetime($ds_id, $uid, $start_time);
    
    
    	$this->json_output($data['data'], $data['status']);
    }
}